package com.sevenGroup.pawnshop.service;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.sevenGroup.pawnshop.controller.form.BrandForm;
import com.sevenGroup.pawnshop.controller.form.SelectBrandForm;
import com.sevenGroup.pawnshop.controller.form.pageForm;
import com.sevenGroup.pawnshop.controller.info.BrandInfo;
import com.sevenGroup.pawnshop.exception.sevenGroupException;
import com.sevenGroup.pawnshop.model.Brand;
import com.baomidou.mybatisplus.extension.service.IService;

import java.util.List;

/**
 * <p>
 * 服务类
 * </p>
 *
 * @author sevenGroup
 * @since 2022-02-16
 */
public interface BrandService extends IService<Brand> {

    //新增品牌
    void saveBrand(BrandForm brandForm) throws sevenGroupException;

    //分页查询所有品牌
    IPage<BrandInfo> selectAllBrand(pageForm pageForm) throws sevenGroupException;

    //根据品牌名模糊查询品牌
    IPage<BrandInfo> selectBrandByBrandName(SelectBrandForm selectBrandForm) throws sevenGroupException;
    //根据大类id查询所有显示的品牌
    List<BrandInfo> selectBrandByFirstTypeId(Integer firstTypeId) throws sevenGroupException;
    //根据品牌id查询品牌
    BrandInfo selectBrandByBrandId(Integer brandId) throws sevenGroupException;
    //更新品牌
    void updateBrand(BrandForm brandForm) throws sevenGroupException;

}
